//
//  LoginViewController.m
//  HDMainWindow
//  登录界面
//  Created by apple on 2017/5/2.
//  Copyright © 2017年 com.devin.definesys. All rights reserved.
//

#import "LoginViewController.h"
#import "ChatListViewController.h"
#import "Target_EaseIM.h"

typedef void (^CallbackBlock)(NSDictionary *info);

@interface LoginViewController ()

@end

@implementation LoginViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (IBAction)loginBtnClick:(id)sender {
//    UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Chat" bundle:[NSBundle mainBundle]];
//    ChatListViewController *viewController = [storyboard instantiateViewControllerWithIdentifier:@"chatList"];
//    [self showViewController:[[UINavigationController alloc] initWithRootViewController:viewController] sender:self];
    Target_EaseIM *easeImTarget = [[Target_EaseIM alloc] init];
    
    __weak __block id weakSelf = self ;
    
    [easeImTarget Action_loginWithUserAndToken:@{
                                                 @"account":@"test123testdemo123",
                                                 @"token":@"123456",
                                                 @"block": ^(NSDictionary *result) {
        NSLog(@"%@",result);
        UINavigationController *navVc = [[UINavigationController alloc] initWithRootViewController:[easeImTarget Action_sessionListViewController:@{}]];
        [weakSelf showViewController:navVc sender:weakSelf];
        }
                                                 }];
}

//无导航栏


@end
